#ifndef LOG_H
#define LOG_H

class Log
{
public:
	Log();
	~Log();

	void Error(CString pszFormat, ...);
	void Info(CString pszFormat, ...);
	void Warning(CString pszFormat, ...);

	bool Init(CString fileName);
	void UnInit();

private:
	void WriteLine(CString type, CString pszFormat, va_list argList);
	void Write(CString time, CString type, CString msg);
	void Write(CString str);
	CFile m_file;
	bool m_opend;
};

extern Log g_Log;

#endif // LOG_H